package com.example.demo.controller;

import com.example.demo.model.BookInfo;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/test")
public class TestController {
    @RequestMapping("/t1")
    public Integer t1(){
        return 1 / 0;
    }

    @RequestMapping("/t2")
    public String t2(){
        String s = null;
        return "" + s.length();
    }

    @RequestMapping("/t3")
    public Boolean t3(){
        Integer[] array = new Integer[5];
        array[5] = 1;
        return true;
    }

    @RequestMapping("/t4")
    public Double t4(){
        return 1.1;
    }

    @RequestMapping("/t5")
    public BookInfo t5(){
        return new BookInfo();
    }
}
